1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | METHOD PRIVATE paintSwitchHover VAR_INPUT END_VAR VAR bWasElementLookDeactivated: BOOL; iThumbOffset : INT; iThumbXGap : INT; iThumbYGap : INT; thumbPaintRectangle : VisuStructPaintRectangle; thumbLook : VisuStructElementLook; iSelectionRadius: INT; // Draw Selection m_pCurrentClientData^.GlobalData.DrawingContext.SetElementLookDeactive(FALSE); IF m_bToggleState THEN iThumbOffset := TRACK_WIDTH; END_IF iSelectionRadius := (HEIGHT_PART-(THUMB_RAIDUS*2))/2; iThumbXGap := 10 + iThumbOffset; iThumbYGap := 10; thumbPaintRectangle := EffectivePosition; iSelectionWidth:= TO_INT((iSelectionRadius)*_currentPart); thumbLook.iLineWidth := iSelectionWidth; thumbLook.dwFillFlags := VisuEnumBrushStyle.BS_HOLLOW; thumbLook.dwFrameFlags := VisuEnumPenStyle.PS_SOLID; thumbPaintRectangle.m_Points[0].iY := thumbPaintRectangle.m_Points[0].iY + TO_INT(iThumbYGap*_currentPart)-iSelectionWidth; thumbPaintRectangle.m_Points[2].iY := thumbPaintRectangle.m_Points[0].iY + iSelectionWidth*2; thumbPaintRectangle.m_Points[1].iY := thumbPaintRectangle.m_Points[0].iY; thumbPaintRectangle.m_Points[3].iY := thumbPaintRectangle.m_Points[2].iY; nType := VisuEnumSimpleType.VISU_ST_CIRCLE, look := thumbLook, colors := ThumbHoverColor, bDrawUnchecked := FALSE, m_pCurrentClientData^.GlobalData.DrawingContext.SetElementLookDeactive(bWasElementLookDeactivated); |